<template>
  <!-- 底部导航组件 -->
   <!-- 调用vant组件 -->
    <van-tabbar route v-model="tabbarActive" >
      <van-tabbar-item :to="item.routePath"  v-for="item in tabbarList" :key="item.id">
        <!-- 标题 -->
        <span>{{ item.title }}</span>
        <template #icon="props">
          <!-- 图片 -->
            <img :src="props.active ? item.iconAc : item.icon">
        </template>
      </van-tabbar-item>
    
    </van-tabbar>
    
    
</template>
    
<script setup lang="ts">
    //导入数据
    import { tabbarList } from '../../model/tabbar';

    import {ref} from 'vue'

    //设置路由地址
    let tabbarActive = ref('/index/home');
    
</script>
    
<style>
</style>